package com.yeyaomai.dksns.flowis.domain;

import java.util.Date;

public class TrendAnalysisHour extends Entity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public TrendAnalysisHour() {

	}

	public TrendAnalysisHour(Date trendDay, String hour, int pageView,
			int uniqueHost, int ip, int newUniqueHost) {
		this.trendDay = trendDay;
		this.hour = hour;
		this.pageView = pageView;
		this.uniqueHost = uniqueHost;
		this.ip = ip;
		this.newUniqueHost = newUniqueHost;
	}

	private long id;// 标识列

	private String average;// 比例

	private Date trendDay;// 日期

	private String hour;// 小时

	private int pageView;// PV数

	private int uniqueHost;// 独立访客数

	private int ip;// ip数

	private int newUniqueHost;// 新独立访客

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public Date getTrendDay() {
		return trendDay;
	}

	public void setTrendDay(Date trendDay) {
		this.trendDay = trendDay;
	}

	public String getHour() {
		return hour;
	}

	public void setHour(String hour) {
		this.hour = hour;
	}

	public int getPageView() {
		return pageView;
	}

	public void setPageView(int pageView) {
		this.pageView = pageView;
	}

	public int getUniqueHost() {
		return uniqueHost;
	}

	public void setUniqueHost(int uniqueHost) {
		this.uniqueHost = uniqueHost;
	}

	public int getIp() {
		return ip;
	}

	public void setIp(int ip) {
		this.ip = ip;
	}

	public int getNewUniqueHost() {
		return newUniqueHost;
	}

	public void setNewUniqueHost(int newUniqueHost) {
		this.newUniqueHost = newUniqueHost;
	}

	public String getAverage() {
		if (average.equals("NaN") || average.equals("Infinity")) {
			return "0.00";
		} else {
			return average;
		}

	}

	public void setAverage(String average) {
		this.average = average;
	}

}
